package upeu.edu.pe.controlador;

/*package com.cticsperu.controller;

import java.util.HashMap;
import java.util.Map;

import com.cticsperu.model.SivMenu;
import com.cticsperu.service.SivMenuService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@Controller
public class SivMenuController {
        protected final Log logger = LogFactory.getLog(SivMenuController.class);
	@Autowired
	private SivMenuService menuService;

	@RequestMapping(value = "articles/save", method = RequestMethod.POST)
	public ModelAndView saveMenu(@ModelAttribute("menuInsertar") SivMenu  menu, BindingResult result) {
             logger.info("*****************:DMP"+menu.getNombre());
             logger.info("*****************:DMP"+menu.getAlias());
             menuService.addMenu(menu);
		return new ModelAndView("redirect:/articles.html");
	}

	@RequestMapping(value = "articles/add", method = RequestMethod.GET)
	public ModelAndView addMenu(@ModelAttribute("menuInsertar") SivMenu menu, BindingResult result) {
		return new ModelAndView("addArticle");
	}        
        
        
	@RequestMapping(value = "/articles",method = RequestMethod.GET)
	public ModelAndView listMenu() {
		Map<String, Object> model = new HashMap<String, Object>();
		model.put("menu",  menuService.listMenu());
		return new ModelAndView("menuList", model);
	}



	@RequestMapping(value = "articles/list", method = RequestMethod.GET)
	public ModelAndView listMenuDMP() {
		Map<String, Object> model = new HashMap<String, Object>();
		model.put("menuD",  menuService.listMenu());
		return new ModelAndView("modulos/dmpList", model);
	}        
       
	@RequestMapping(value = "articles/validar", method = RequestMethod.GET)
	public ModelAndView validar() {
		Map<String, Object> model = new HashMap<String, Object>();
		model.put("menuD",  menuService.listMenu());
		return new ModelAndView("modulos/validar", model);
	}           

        
	@RequestMapping(value = "articles/validardm", method = RequestMethod.GET)
	public ModelAndView validarDM() {
		Map<String, Object> model = new HashMap<String, Object>();
		model.put("menuR",  menuService.listMenu());
		model.put("menuD",  menuService.listMenu());
		return new ModelAndView("modulos/validar", model);
	}           
               
        
}*/